FROM golang:1.22.2-alpine AS builder
WORKDIR /app
COPY . .
RUN go mod tidy
RUN go build -o booking-service ./cmd/booking-service

FROM alpine:latest
WORKDIR /root/
COPY --from=builder /app/booking-service .
COPY .env .
EXPOSE 8080
CMD ["./booking-service"]
